{% extends "layout.html" %}


{% block main %}
<br/>
<br/>
<br/>

<h1 align="center">Documentation</h1>

<h2 class="titillium" style="color: black" align="center">Interested in the code? It's <a href="https://github.com/malwaredllc/byob">open-source</a><i class="fa fa-github" style="  margin: 0; padding: 10px; line-height: 1; color: #aa1e28;"></i></h3>

<div id="page-content" align="left" style="background-color: white; padding: 20px">

<!-- 	<h1><a id="user-content-byob-build-your-own-botnet-" class="anchor" href="#byob-build-your-own-botnet-" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Documentation</h1> -->


	<p><a href="https://github.com/malwaredllc/byob/blob/master/LICENSE"><img src="https://camo.githubusercontent.com/89c5b9f7e3585f1ae56021eba0d29dcdaa3e013f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d47504c2d627269676874677265656e2e737667" alt="license" data-canonical-src="https://img.shields.io/badge/license-GPL-brightgreen.svg" style="max-width:100%;"></a>

		<a href="https://github.com/malwaredllc/byob"><img src="https://camo.githubusercontent.com/77c4e1df44aafb2fa889895dca118b91733e58fb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e352d6c69676874677265792e737667" alt="version" data-canonical-src="https://img.shields.io/badge/version-0.5-lightgrey.svg" style="max-width:100%;"></a>

		<a href="https://travis-ci.com/malwaredllc/byob.svg?branch=master" rel="nofollow"><img src="https://camo.githubusercontent.com/03ee157ee56e1b12863ec6eab742633281f5d7b3/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f6d616c77617265646c6c632f62796f622f6d61737465722e737667" alt="build" data-canonical-src="https://img.shields.io/travis/com/malwaredllc/byob/master.svg" style="max-width:100%;"></a></p>

		<p><strong>Disclaimer</strong>: This project should be used for authorized testing or educational purposes only.</p><p>BYOB is an open-source project that provides a framework for security researchers and developersto build and operate a basic botnet to deepen their understanding of the sophisticated malwarethat infects millions of devices every year and spawns modern botnets, in order to improve theirability to develop counter-measures against these threats.</p><p>It is designed to allow developers to easily implement their own code and add cool newfeatures <em>without</em> having to write a <strong>RAT</strong> (Remote Administration Tool) or a<strong>C2</strong> (Command &amp; Control server) from scratch.</p><p><em>The RAT's key feature is that arbitrary code/files can be remotely loaded into memoryfrom the C2 and executed on the target machine without writing anything to the disk.</em></p><p>Supports Python 2 &amp; 3.</p>

		<h2><a id="user-content-client" class="anchor" href="#client" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Client</h2><p><a href="https://github.com/colental/byob/blob/master/byob/core/payloads.py"><img src="https://camo.githubusercontent.com/b0a94d0a7ed656dc8f48626eb584e4562d51d490/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f62796f622d636c69656e742d626c75652e737667" alt="client" data-canonical-src="https://img.shields.io/badge/byob-client-blue.svg" style="max-width:100%;"></a></p><p><em>Generate fully-undetectable clients with staged payloads, remote imports, and unlimited post-exploitation modules</em></p><ol><li><strong>Remote Imports</strong>: remotely import third-party packages from the server without writing themto the disk or downloading/installing them</li><li><strong>Nothing Written To The Disk</strong>: clients never write anything to the disk - not even temporary files (zero IOsystem calls are made) because remote imports allow arbitrary code to bedynamically loaded into memory and directly imported into the currently runningprocess</li><li><strong>Zero Dependencies (Not Even Python Itself)</strong>: client runs with just the python standard library, remotely imports any non-standardpackages/modules from the server, and can be compiled with a standalone pythoninterpreter into a portable binary executable formatted for any platform/architecture,allowing it to run on anything, even when Python itself is missing on the target host</li><li><strong>Add New Features With Just 1 Click</strong>: any python script, module, or package you copy to the <code>./byob/modules/</code> directoryautomatically becomes remotely importable &amp; directly usable by every client whileyour command &amp; control server is running</li><li><strong>Write Your Own Modules</strong>: a basic module template is provided in <code>./byob/modules/</code> directory to make writingyour own modules a straight-forward, hassle-free process</li><li><strong>Run Unlimited Modules Without Bloating File Size</strong>: use remote imports to add unlimited features without adding a single byte to theclient's file size</li><li><strong>Fully Updatable</strong>: each client will periodically check the server for new content available forremote import, and will dynamically update its in-memory resourcesif anything has been added/removed</li><li><strong>Platform Independent</strong>: everything is written in Python (a platform-agnostic language) and the clientsgenerated can optionally be compiled into a portable executable (<em>Windows</em>) orbundled into a standalone application (<em>macOS</em>)</li><li><strong>Bypass Firewalls</strong>: clients connect to the command &amp; control server via reverse TCP connections, whichwill bypass most firewalls because the default filter configurations primarilyblock incoming connections</li><li><strong>Counter-Measure Against Antivirus</strong>: avoids being analyzed by antivirus by blocking processes with names of known antivirusproducts from spawning</li><li><strong>Encrypt Payloads To Prevent Analysis</strong>: the main client payload is encrypted with a random 256-bit key which exists solelyin the payload stager which is generated along with it</li><li><strong>Prevent Reverse-Engineering</strong>: by default, clients will abort execution if a virtual machine or sandbox is detected</li></ol>

		<h2><a id="user-content-modules" class="anchor" href="#modules" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Modules</h2><p><a href="https://github.com/colental/byob/blob/master/byob/modules"><img src="https://camo.githubusercontent.com/a6122c32d0702f6a7f9c0b15041614f5c587e1b6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f62796f622d6d6f64756c65732d626c75652e737667" alt="modules" data-canonical-src="https://img.shields.io/badge/byob-modules-blue.svg" style="max-width:100%;"></a></p><p><em>Post-exploitation modules that are remotely importable by clients</em></p><ol><li><strong>Keylogger</strong> (<code>byob.modules.keylogger</code>): logs the user\u2019s keystrokes &amp; the window name entered</li><li><strong>Screenshot</strong> (<code>byob.modules.screenshot</code>): take a screenshot of current user\u2019s desktop</li><strong>Outlook</strong> (<code>byob.modules.outlook</code>): read/search/upload emails from the local Outlook client</li><li><strong>Packet Sniffer</strong> (<code>byob.modules.packetsniffer</code>): run a packet sniffer on the host network &amp; upload .pcap file</li><li><strong>Persistence</strong> (<code>byob.modules.persistence</code>): establish persistence on the host machine using 5 different methods</li><li><strong>Phone</strong> (<code>byob.modules.phone</code>): read/search/upload text messages from the client smartphone</li><li><strong>Escalate Privileges</strong> (<code>byob.modules.escalate</code>): attempt UAC bypass to gain unauthorized administrator privileges</li><li><strong>Port Scanner</strong> (<code>byob.modules.portscanner</code>): scan the local network for other online devices &amp; open ports</li><li><strong>Process Control</strong> (<code>byob.modules.process</code>): list/search/kill/monitor currently running processes on the host</li><li><strong>iCloud</strong> (<code>byob.modules.icloud</code>): check for logged in iCloud account on macOS</li></ol>

		<h2><a id="user-content-server" class="anchor" href="#server" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Server</h2><p><a href="https://github.com/colental/byob/blob/master/byob/server.py"><img src="https://camo.githubusercontent.com/84369fd7642bc1e7c01439bfd828b21c2399f474/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f62796f622d7365727665722d626c75652e737667" alt="server" data-canonical-src="https://img.shields.io/badge/byob-server-blue.svg" style="max-width:100%;"></a></p><p><em>Command &amp; control server with persistent database and console</em></p><ol><li><strong>Console-Based User-Interface</strong>: streamlined console interface for controlling client host machines remotely viareverse TCP shells which provide direct terminal access to the client host machines</li><li><strong>Persistent SQLite Database</strong>: lightweight database that stores identifying information about client host machines,allowing reverse TCP shell sessions to persist through disconnections of arbitraryduration and enabling long-term reconnaissance</li><li><strong>Client-Server Architecture</strong>: all python packages/modules installed locally are automatically made available for clientsto remotely import without writing them to the disk of the target machines, allowing clients to use modules which requirepackages not installed on the target machines</li></ol>

		<h2><a id="user-content-core" class="anchor" href="#core" aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Core</h2><p><a href="https://github.com/colental/byob/blob/master/byob/core"><img src="https://camo.githubusercontent.com/13c31c2c35b791a4d656bc76b8434fbc955ee213/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f62796f622d636f72652d626c75652e737667" alt="core" data-canonical-src="https://img.shields.io/badge/byob-core-blue.svg" style="max-width:100%;"></a></p><p><em>Core framework modules used by the generator and the server</em></p><ol><li><strong>Utilities</strong> (<code>byob.core.util</code>): miscellaneous utility functions that are used by many modules</li><li><strong>Security</strong> (<code>byob.core.security</code>): Diffie-Hellman IKE &amp; 3 encryption modes (AES-256-OCB, AES-256-CBC, XOR-128)</li><li><strong>Loaders</strong> (<code>byob.core.loaders</code>): remotely import any package/module/scripts from the server</li><li><strong>Payloads</strong> (<code>byob.core.payloads</code>): reverse TCP shell designed to remotely import dependencies, packages &amp; modules</li><li><strong>Stagers</strong> (<code>byob.core.stagers</code>): generate unique payload stagers to prevent analysis &amp; detection</li><li><strong>Generators</strong> (<code>byob.core.generators</code>): functions which all dynamically generate code for the client generator</li><li><strong>Database</strong> (<code>byob.core.database</code>): handles interaction between command &amp; control server and the SQLite database</li><li><strong>Handler</strong> (<code>byob.core.handler</code>): HTTP POST request handler for remote file uploads to the server</li></ol>

</div>
{% endblock %}
